home *** CD-ROM | disk | FTP | other *** search
/ Star Festival... a Return to Japan / Star Festival... a Return to Japan.iso / pc / STARFESTIVAL / Shared.Cst / 00144_thumb.ls < prev    next >
Encoding:
Text File  |  1999-10-10  |  1.1 KB  |  41 lines

  1. on setUpThumb
  2.   global gSliderStart, gSliderLength, gThumbSprite
  3.   global gPcVidSprite
  4.   global gTimeTot
  5.   
  6.   -- in case this is a second time through this movie, when the thumb may not
  7.   --  have been left at the beginning, put it there
  8.   set the locH of sprite gThumbSprite = gSliderStart
  9.   
  10.   set timeTotStr = trackStopTime (sprite gPcVidSprite, 1) 
  11.   
  12.   set gTimeTot = value(timeTotStr)
  13.   
  14. end setUpThumb
  15.  
  16. ------------------------------------------------------------------------
  17. -- idle handler for thumb position
  18. on moveThumb
  19.   global gSliderStart, gSliderLength, gThumbSprite
  20.   global gTimeTot
  21.   global gPcVidSprite
  22.   
  23.   set timeNowStr = the movieTime of sprite gPcVidSprite 
  24.   
  25.   set timeNow = value(timeNowStr)
  26.   
  27.   -- provided we have passed the init section which sets gTimeTot, move the sprite
  28.   if (gTimeTot) then
  29.     set offsetBh = ((timeNow * gSliderLength) / gTimeTot)
  30.     set the locH of sprite gThumbSprite = gSliderStart + offsetBh
  31.     
  32.     --set the locH of sprite 46 = the mouseH
  33.     --set the locV of sprite 46 = the mouseV
  34.     
  35.     updateStage
  36.     
  37.   end if
  38.   
  39. end moveThumb
  40.  
  41.